<!DOCTYPE html>
<html lang="en">
<!--4月一号以前的installer-->

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" />
    <title>Mandatory Declaration</title>
    <link href="../css/common.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body,
        div,
        dl,
        dt,
        dd,
        ul,
        ol,
        li,
        h1,
        h2,
        h3,
        h4,
        h5,
        h6,
        pre,
        code,
        form,
        fieldset,
        legend,
        input,
        texarea,
        p,
        blockquote,
        th,
        td {
            margin: 0px;
            padding: 0px;
        }
        
        body {
            overflow-x: hidden;
            font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
            font-weight: normal;
            line-height: 1.5;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
        
        div,
        p {
            word-wrap: break-word;
        }
        
        .container {
            padding: 16px;
            background-color: #f8f8f8;
            margin-bottom: 64px;
        }
        
        .bottomContainer {
            width: 100%;
            position: fixed;
            bottom: 0;
            background-color: #ffffff;
        }
        
        .text {
            font-size: 15px;
            font-weight: 400;
            line-height: 20px;
            opacity: 1;
        }
        
        .textColorTitle {
            color: #b3b7be;
        }
        
        .textColorGrey {
            color: #999999;
        }
        
        .textColorBlack {
            color: #444444;
        }
        
        .textColorBlackBold {
            color: #444444;
            font-weight: bold;
        }
        
        .greyRadius {
            width: 83px;
            height: 24px;
            background: #8491a3;
            opacity: 1;
            border-radius: 4px 4px 0px 0px;
            color: #ffffff;
            text-align: center;
            margin-top: 14px;
        }
        
        .greyRadius1 {
            width: 93px;
            height: 24px;
            background: #8491a3;
            opacity: 1;
            border-radius: 4px 4px 0px 0px;
            color: #ffffff;
            text-align: center;
            margin-top: 15px;
        }
        
        .line {
            height: 0;
            border-bottom: 0.5px solid #ebebeb;
            opacity: 1;
        }
        
        .marginTop10 {
            margin-top: 10px;
        }
        
        .marginTop4 {
            margin-top: 4px;
        }
        
        .serialRight {
            padding-left: 9px;
            flex: 1;
        }
        
        .serialContainer {
            font-size: 15px;
            font-weight: 400;
            line-height: 20px;
            opacity: 1;
            color: #444444;
            margin-top: 10px;
            display: flex;
            display: -webkit-flex;
        }
        
        .serialBold {
            font-size: 15px;
            font-weight: bold;
            line-height: 20px;
            opacity: 1;
            color: #444444;
            margin-top: 10px;
        }
        
        .serial {
            width: 25px;
        }
        
        .panelNumber {
            height: 110px;
            overflow: scroll;
        }
        
        .paddingLeft6 {
            padding-left: 6px;
        }
    </style>
</head>

<body>
    <div class="container">
        <p class="text textColorTitle">
            Please scroll down and read it carefully
        </p>
        <div class="card">
            <p class="text textColorGrey">
                Date:<span class="textColorBlack paddingLeft6" id="input_date"></span>
            </p>
            <div class="text greyRadius">Schedule</div>
            <div class="line"></div>
            <p class="text textColorGrey marginTop10">Item1. Installation Date</p>
            <p class="text textColorBlack marginTop4">As shown on the APP</p>

            <p class="text textColorGrey marginTop10">
                Item2. Installation panel serial number
            </p>
            <!-- 填入serial number -->
            <p class="text textColorBlack marginTop4 panelNumber" id="input_serials"></p>
            <p class="text textColorGrey marginTop10">
                Item3. Installation address
            </p>
            <!-- 填入地址 -->
            <p class="text textColorBlack marginTop4" id="input_install_address"></p>

            <p class="text textColorGrey marginTop10">Item4. SRE System</p>
            <p class="text textColorBlack marginTop4">Solar System</p>

            <p class="text textColorGrey marginTop10">
                Item5. Designer of SRE System
            </p>
            <!-- 填入名字 -->
            <p class="text textColorBlack marginTop4" id="input_designer_name"></p>

            <p class="text textColorGrey marginTop10">
                Item6. Owner contact information
            </p>
            <!-- 填入电话邮箱 -->
            <!-- 0733871888<br />
                qld@onestopwarehouse.com.au -->
            <p class="text textColorBlack marginTop4" id="input_phone_email"></p>

            <div class="text greyRadius1">Declaration</div>
            <div class="line"></div>
            <p class="text textColorBlack marginTop10">
                I,
                <span class="text textColorBlackBold" id="input_installer_name">
                    [installer name]
                </span> , of
                <span class="text textColorBlackBold" id="input_installation_address">
                    [installation address]
                </span> , declare as follows:
            </p>
            <p class="serialBold">1.Installation</p>
            <div class="serialContainer">
                <span class="serial">1.1</span>
                <span class="serialRight">
                        that on the date listed in Item 1, I installed an eligible
                        small-scale renewable system at the address provided in Item 3 (the
                        <span class="textColorBlackBold">Installation</span>);
                </span>
            </div>
            <div class="serialContainer">
                <span class="serial">1.2</span>
                <span class="serialRight">
                        that the eligible small-scale renewable system installed was as
                        described in Item 4 (the
                        <span class="textColorBlackBold">SRE System</span>);
                </span>
            </div>

            <div class="serialContainer">
                <span class="serial">1.3</span>
                <span class="serialRight">
                        the Designer of the SRE System is as provided in Item 5;
                    </span>
            </div>
            <div class="serialContainer">
                <span class="serial">1.4</span>
                <span class="serialRight">
                        that the contact information of the owner of the SRE System is as
                        provided in Item 6;
                    </span>
            </div>

            <p class="serialBold">2.Accreditation and licencing</p>
            <div class="serialContainer">
                <span class="serial">2.1</span>
                <span class="serialRight">
                        that prior to and throughout the Installation:
                    </span>
            </div>
            <div class="serialContainer">
                <span class="serial">(a)</span>
                <span class="serialRight">
                        I was accredited by the Clean Energy Council as an installer of SRE
                        Systems (the
                        <span class="textColorBlackBold">CEC</span>);
                </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(b)</span>
                <span class="serialRight">
                        the Designer of the SRE System was accredited by the CEC as a
                        designer of SRE Systems;
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(c)</span>
                <span class="serialRight">
                        I held at least AU$5,000,000.00 in public liability insurance; and
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(d)</span>
                <span class="serialRight">
                        I held an unrestricted electrical licence issued by the state or
                        territory in which the Installation took place which was appropriate
                        for the Installation as provided by Regulation 20AC of the
                        <i>Renewable Energy (Electricity) Regulations 2001</i> (Cth);
                    </span>
            </div>

            <p class="serialBold">3.Components</p>
            <div class="serialContainer">
                <span class="serial">3.1</span>
                <span class="serialRight">
                        that the components of the SRE System installed were listed on the
                        CEC’s list of approved products, including:
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(a)</span>
                <span class="serialRight">
                        AS/NZS 5033 "Installation and safety requirements for photovoltaic
                        (PV) arrays"; and
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(b)</span>
                <span class="serialRight">
                        if applicable, tested and approved grid connected inverters (which
                        includes off grid inverters);
                    </span>
            </div>

            <p class="serialBold">4.Compliance during installation</p>
            <div class="serialContainer">
                <span class="serial">4.1</span>
                <span class="serialRight"> that during the Installation: </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(a)</span>
                <span class="serialRight">
                        I complied with the CEC code of conduct for installations; and
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(b)</span>
                <span class="serialRight">
                        I complied with the installation guidelines published by the CEC;
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">4.2</span>
                <span class="serialRight">
                        that the Installation and SRE System complied with the following
                        standards (where applicable):
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(a)</span>
                <span class="serialRight">
                        AS/NZS 5033 "Installation and safety requirements for photovoltaic
                        (PV) arrays";
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(b)</span>
                <span class="serialRight">
                        AS/NZS 1170.2 "Structural design actions, Part 2: Wind actions";
                    </span>
            </div>
            <div class="serialContainer">
                <span class="serial">(c)</span>
                <span class="serialRight">
                        AS/NZS 4509.1 "Stand-alone power systems, Part 1: Safety and
                        installation";
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(d)</span>
                <span class="serialRight">
                        AS 4086.2 "Secondary batteries for use with stand-alone power
                        systems, Part 2: Installation and maintenance";
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(e)</span>
                <span class="serialRight"> AS/NZS 3000 "Wiring Rules"; </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(f)</span>
                <span class="serialRight">
                        AS/NZS 1768 "Lightning protection"; and
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(g)</span>
                <span class="serialRight">
                        AS 4777 "Grid connection of energy systems via inverters";
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">4.3</span>
                <span class="serialRight">
                        that all relevant local, state/territory and federal legislation,
                        regulation and policy have been met for the:
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(a)</span>
                <span class="serialRight"> siting of the SRE System; </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(b)</span>
                <span class="serialRight">
                        attachment of the SRE System (if it is attached to a building or
                        structure); and
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(c)</span>
                <span class="serialRight">
                        grid-connection of the SRE System (if it is grid-connected);
                    </span>
            </div>

            <p class="serialBold">5.Compliance documentation</p>
            <div class="serialContainer">
                <span class="serial">5.1</span>
                <span class="serialRight">
                        that <span class="textColorBlackBold">attached</span> to this declaration is a series of photographs showing:
                </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(a)</span>
                <span class="serialRight"> the position of the SRE System; </span>
            </div>

            <div class="serialContainer">
                <span class="serial">(b)</span>
                <span class="serialRight">
                        the manufacturer and model of the SRE System components (or the
                        whole SRE System); and
                    </span>
            </div>
            <div class="serialContainer">
                <span class="serial">(c)</span>
                <span class="serialRight">
                        the serial number of the SRE System;
                    </span>
            </div>

            <div class="serialContainer">
                <span class="serial">5.2</span>
                <span class="serialRight">
                        that <span class="textColorBlackBold">attached</span> to this are documents supporting the matters dealt with in subclause 2.1. If such information has been previously provided, I warrant that this information remains
                accurate and up-to-date;
                </span>
            </div>

            <div class="serialContainer">
                <span class="serial">5.3</span>
                <span class="serialRight">
                        that <span class="textColorBlackBold">attached</span> to this is a completed and signed compliance statement;
                </span>
            </div>

            <div class="serialContainer">
                <span class="serial">5.4</span>
                <span class="serialRight">
                        that <span class="textColorBlackBold">attached</span> to this is a verification statement issued by the owner of the SRE System verifying that either myself, or my supervisor, attended to the Installation;
                </span>
            </div>

            <div class="serialContainer">
                <span class="serial">5.5</span>
                <span class="serialRight">
                        that <span class="textColorBlackBold">attached</span> to this declaration is any relevant state or territory government electrical installation compliance documentation;
                </span>
            </div>

            <p class="serialBold">
                I agree to this device (GreenDeal App) taking a photo of me while I sign off to verify my identity.
            </p>
        </div>
    </div>
    <div class="bottomContainer">
        <div class="summitDiv">
            <button type="button" class ="summitButton" onclick="agree();">I Agree & Continue</button>
<!--            <input type="image" src="../images/btn_i_agree_continue.png" style="width: 164px;height: 64px;" onclick="agree();" />-->

        </div>
    </div>
    </div>
</body>
<script type="text/javascript" src="../javascripts/platform.js"></script>
<script language="javascript">
    function init_data(jsonData) {
        var currentDate = new Date();
        var month = currentDate.getMonth();
        var today = currentDate.getDate();
        month = month + 1;
        var monthStr = "";
        if (month < 10) {
            monthStr = "0" + month;
        }else{
            monthStr = ""+month;
        }
        var todayStr = "";
        if (today < 10) {
            todayStr = "0" + today;
        } else {
            todayStr = today;
        }
        var time = todayStr + "-" + monthStr + "-" + currentDate.getFullYear();
        var serialNumbers = "";
        if (jsonData.pvd_serial_numbers.length > 0) {
            for (var item of jsonData.pvd_serial_numbers) {
                if (item.code != null) {
                    serialNumbers = serialNumbers + item.code;
                }
            }
        }
        var installation_address = jsonData.install_address.installation_address;
        var designer_name = jsonData.signatures.designer_full_name;
        var phoneAndEmail = "";
        var phone = jsonData.owner_address.phone;
        var email = jsonData.owner_address.email;
        if (phone != null && email != null) {
            phoneAndEmail = phone + "<br/>" + email;
        } else {
            phone + email;
        }
        document.getElementById("input_date").innerText = time;
        document.getElementById("input_serials").innerText = serialNumbers;
        document.getElementById("input_install_address").innerText = installation_address;
        document.getElementById("input_designer_name").innerText = designer_name;
        document.getElementById("input_phone_email").innerHTML = phoneAndEmail;
        document.getElementById("input_installer_name").innerText = jsonData.signatures.installer_full_name;
        document.getElementById("input_installation_address").innerText = jsonData.signatures.installer_full_address;
    }

    var data;

    function init_pvd_detail(detail) {
        data = detail;
        init_data(data);
    }

    function agree() {
        if (isIos) {
            window.webkit.messageHandlers.event.postMessage({
                "event": "capture",
                "key": "installer_agree_selfie"
            });
        }
        if (isAndroid) {
            myJsBridge.capture('installer_agree_selfie');
        }
    }

    let doc_version = "3";

    function captureSuccess() {
        let local = getLocalParam();
        local["installer_declaration_version"] = doc_version;
        addParamToLocal(local);
        if (isIos) {
            window.webkit.messageHandlers.WebViewEvent.postMessage(local);
        }
        if (isAndroid) {
            myJsBridge.submit(JSON.stringify(local));
        }
    }

    function getLocalParam() {
        var local = localStorage.getItem('param');
        if (local != "" && local != null && local != undefined) {
            console.log(local)
            return JSON.parse(local);
        } else {
            return {};
        }
    }

    function addParamToLocal(dictionary) {
        localStorage.setItem('param', JSON.stringify(dictionary));
    }

    if (isAndroid) {
        let json = myJsBridge.initData();
        init_pvd_detail(JSON.parse(json));
    }

    if (isIos) {
        window.webkit.messageHandlers.event.postMessage({
            "event": "getPvddetail"
        });
    }
</script>

</html>
